﻿using System;
using System.Web.UI;

namespace BrandonHaynes.ModelAdapter.EntityFramework.DotNetNuke.ModuleSample
	{
	public partial class View : global::DotNetNuke.Entities.Modules.PortalModuleBase
		{
		protected void Page_Load(object sender, EventArgs e)
			{
			if (!Page.IsPostBack)
				{
				Pages.DataTextField = "TabName";

				using (var context = new DotNetNukeEntities())
					{
					Pages.DataSource = context.Tabs;
					Pages.DataBind();
					}
				}
			}
		}
	}